package e3dcs

import (
	"runtime"

	"gitee.com/ameise84/e3utils/math"
)

const (
	BLModePoll BLMode = iota + 1 //轮询或本地
	BLModeBest                   //寻找最优的
	BLModeHash                   //一致性hash
)

const (
	statePreparing stateKind = iota
	stateReady
	stateMoving //接受已存在用户的消息处理
	stateDestroy
)

var serviceStateString = map[stateKind]string{
	statePreparing: "preparing",
	stateReady:     "ready",
	stateMoving:    "moving",
	stateDestroy:   "destroy",
}

var (
	initPollActorNum = math.CeilToPowerOfTwo(uint64(runtime.NumCPU() * 4))
)

const maxVirtualCount = 64
